<template>
  <div>
    <h1>vue3传值以及插槽</h1>
    <FirstDemo :person='person' @change='changename'>
      <template v-slot:qwe>
        <div>我是插槽1</div>
      </template>
      <template v-slot:asd>
        <div>我是插槽2</div>
      </template>
    </FirstDemo>
  </div>
</template>

<script>
import FirstDemo from '@/components/FirstDemo.vue'
import {reactive} from 'vue'
export default {
  components:{
    FirstDemo
  },
  setup () {
    let person =reactive({
      name:'张三',
      age:15,
      salary:"23K"
    })
    function changename(val){
      person.name=val
    }
    return {
      person,
      changename
    }
  }
}
</script>

<style lang="less" scoped>

</style>